#!/bin/bash
nohup java -jar demo-0.0.1-SNAPSHOT.jar \
 --server.port=8090 \
 --spring.profiles.active=prod \
 -Xms1024m \
 -Xmx1024m \
 -XX:+HeapDumpOnOutOfMemoryError \
 -XX:HeapDumpPath=dumpSnap.hprof \
 >> nohup.log 2>&1 & echo $! > run.pid &&
echo "进程状态:"
echo "$(netstat -anlp|grep 8090)"
tail -f nohup.log